package priv.pront.code.mati.province;

import java.util.Scanner;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-11 13:55
 */
public class MC0108_白给 {

    static int x, y, t;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        x = scanner.nextInt();
        y = scanner.nextInt();
        t = scanner.nextInt();
        while (t-- > 0) {
            if(x >= y){
                y += x / 2;
                x -= x / 2;
            }else{
                x += y / 2;
                y -= y / 2;
            }
        }
        System.out.println(x + " " + y);



    }
}
